<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>User's Schedule</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <link rel="stylesheet" href="css/mycss.css" type="text/css"></link>
    </h:head>

    <body style="background-color:#F0FFFF"></body>
    
    <h:body>

        <h:form>
            <p:growl id="messages" showDetail="true" />
            <br/>

            <br/><br/>
            <p:schedule value="#{searchBean.eventModel}" widgetVar="myschedule" timeZone="GMT+1">
                <p:ajax event="eventSelect" listener="#{searchBean.onEventSelect}" update="eventDetails" oncomplete="PF('eventDialog').show();" />
                <p:ajax event="eventMove" listener="#{searchBean.onEventMove}" update="messages" />
                <p:ajax event="eventResize" listener="#{searchBean.onEventResize}" update="messages" />
            </p:schedule>



            <p:dialog widgetVar="eventDialog" header="Event Details" showEffect="clip" hideEffect="clip">
                <h:panelGrid id="eventDetails" columns="2">

                    <br/><p:dataTable id="eventDetail"
                                      var="bb"
                                      value="#{searchBean.list}">



                        <p:column  headerText="Name" style="width:180px;text-align:center">
                            <h:outputText value="#{bb.eventname}"/>
                        </p:column>

                        <p:column headerText="City" style="width:85px;text-align:center">
                            <h:outputText value="#{bb.city}"/>
                        </p:column>

                        <p:column headerText="Place" style="width:100px;text-align:center">
                            <h:outputText value="#{bb.place}"/>
                        </p:column>

                        <p:column headerText="Date" style="width:85px;text-align:center">
                            <h:outputText value="#{bb.eventdate}"/>
                        </p:column>

                        <p:column headerText="Start Time" style="width:40px;text-align:center">
                            <h:outputText value="#{bb.timestart}"/>

                        </p:column><p:column headerText="End Time" style="width:40px;text-align:center">
                            <h:outputText value="#{bb.timefinish}"/>
                        </p:column>

                        <p:column headerText="Type" style="width:80px;text-align:center">
                            <h:outputText value="#{bb.eventtype}"/>
                        </p:column>

                        <p:column headerText="Visibility" style="width:80px;text-align:center">
                            <h:outputText value="#{bb.visibility}"/>
                        </p:column> 

                        <p:column headerText="Weather" style="width:80px;text-align:center">
                            <h:outputText value="#{bb.weather}"/>
                        </p:column>

                        <p:column headerText="Creator" style="width:200px;text-align:center">
                            <h:outputText value="#{bb.creator}"/>
                        </p:column>

                     
                    </p:dataTable>

                </h:panelGrid>
            </p:dialog>
            <br/>
            <h:commandLink action="#{counter.count()}" value="Back to your Homepage"/>

        </h:form>

    </h:body>
</html>